<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Audit Status</title>
<link rel="stylesheet" type="text/css" href="css/reg.css" />
<!--jquery库-->
<script src="js/jquery.min.js"></script>
<!--bootstrap库-->
<link href="css/bootstrap.min.css" rel="stylesheet" />
<script src="js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
      <script src="js/bootstrap/html5shiv.min.js"></script>
      <script src="js/bootstrap/respond.min.js"></script>
    <![endif]-->
<!--font-awesome字体库-->
<link href="css/font-awesome.min.css" rel="stylesheet" />
<!--页面加载进度条-->
<link href="css/pace/dataurl.css" rel="stylesheet" />
<script src="js/pace/pace.min.js"></script>

<!--jquery.hammer手势插件-->
<script src="js/jquery.hammer/hammer.min.js"></script>
<script src="js/jquery.hammer/jquery.hammer.js"></script>

<!--平滑滚动到顶部库-->
<script src="js/jquery.scrolltopcontrol/scrolltopcontrol.js"
	type="text/javascript"></script>

<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet"
	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
	integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
	crossorigin="anonymous">

<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
<link rel="stylesheet"
	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
	integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp"
	crossorigin="anonymous">

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script
	src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"
	integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
	crossorigin="anonymous"></script>


<!--主要写的css代码-->
<link href="css/default.css" rel="stylesheet" type="text/css" />

<!--主要写的js代码-->
<script src="js/default.js" type="text/javascript"></script>

<style type="text/css">
body {
	margin: 0;
	padding: 0;
	margin: 0;
}

#regform {
	font: 0.9em Georgia, serif;
}

h2 {
	text-align: center;
}

#wrapper {
	width: 500px;
	height: 650px;
	padding: 10px;
	margin-top: 0%;
	margin-left: 35%;
	margin-right: auto;
	display: block;
}

#wrapper div {
	margin-left: 10px;
	margin-top: 15px;
}

#addr {
	text-align: left;
	padding-left: 13px;
}

#cpwd {
	width: 150px;
	text-align: left;
	padding-left: 13px;
}

#piclb {
	width: 128px;
	text-align: left;
	padding-left: 13px;
}

#portraitlb {
	text-align: left;
	width: 130px;
	padding-left: 13px;
}

#icnum {
	width: 130px;
	text-align: left;
}

.pic {
	width: 280px;
}

button {
	margin-left: 43%;
}

.back-box {
	margin-top: 20px;
}

.back-box a {
	font: 1em Georgia, serif;
	margin-left: 44%;
	color: #4a4744;
	font-size: 13px;
	text-decoration: none;
}

.back-box a:hover {
	color: #ff7d0a;
}

.back-box a:active {
	color: #ee7204;
}
</style>
</head>
<body>
     <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle show pull-left" data-target="sidebar">
                    <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
                </button>
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                        aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
                </button>
            </div>
            <div id="navbar" class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                    <li><a href ="javascript:return false;" disabled="disabled">订单管理</a></li>
                    <li><a href ="javascript:return false;" disabled="disabled">菜品管理</a></li>
                    <li><a href ="javascript:return false;" disabled="disabled">订单评论</a></li>
                    <li><a href ="javascript:return false;" disabled="disabled">菜品推荐</a></li>
                    <li><a href ="javascript:return false;" disabled="disabled">开始营业</a></li>
                    <li><a href ="javascript:return false;" disabled="disabled">打烊</a></li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                           aria-expanded="false"><i class="fa fa-user fa-fw"></i>&nbsp;${sessionScope.name }&nbsp;<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href ="javascript:return false;" disabled="disabled">订单管理</a></li>
                            <li class="divider"></li>
                            <li><a href ="javascript:return false;" disabled="disabled">菜品管理</a></li>
                            <li class="divider"></li>
                            <li><a href ="javascript:return false;" disabled="disabled">订单评论</a></li>
                            <li class="divider"></li>
                            <li><a href ="javascript:return false;" disabled="disabled">菜品推荐</a></li>
                            <li class="divider"></li>
                            <li><a href ="javascript:return false;" disabled="disabled"><i class="fa fa-sign-out fa-fw"></i>&nbsp;退出登录</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
		<div  class="jumbotron" >
		  <div style="margin-left:37%;">
			<h3>Audit Status</h3>
			<c:if test="${info.status=='1' }">
				<p>还在待审核中......</p>
			</c:if>
			<c:if test="${info.status=='3' }">
				<p>申请被驳回</p>
				<p>${info.reason }</p>
			</c:if>
			<h3>You can rewrite the audit info</h3>
			
		</div>
		</div>
		<div id="wrapper">
			<form class="form-horizontal" id="regform" method="post"
				action="updateRegister" enctype="multipart/form-data">
				<input type="hidden" name="mid" value="${m.mid }" />
				<div class="form-group">
					<label for="exampleInputName2" class="col-sm-2 control-label">UserName</label>
					<div class="col-sm-10">
						<input disabled="disabled" id="mname" name="mname" type="text" value="${m.mname }"
							class="form-control" id="exampleInputName2"
							placeholder="UserName"> <span id="nameMsg" style="color: red"></span>
					</div>
				</div>
				<div class="form-group">
					<label for="inputPassword3" class="col-sm-2 control-label piclb">Password</label>
					<div class="col-sm-10">
						<input name="mpwd" id="mpwd" type="password"  class="
							form-control"
						id="inputPassword3" placeholder="Password">
						<span id="pwdMsg" style="color: red"></span>
					</div>
				</div>
				<div class="form-group">
					<label for="inputPassword3" id="cpwd"
						class="col-sm-2 control-label piclb">Confirm Password</label>
					<div class="col-sm-10">
						<input id="comPwd" name="comPwd" type="password" class="form-control"
							id="inputPassword3" placeholder="Confirm Password">
					</div>
				</div>
				<div class="form-group">
					<label for="exampleInputName2" id="addr"
						class="col-sm-2 control-label">Address</label>
					<div class="col-sm-10">
						<input name="maddr" id="maddr" type="text" value="${m.maddr }"
							class="form-control" id="exampleInputName2" placeholder="Address">
					</div>
				</div>
				<div class="form-group">
					<label for="exampleInputName2" 
						class="col-sm-2 control-label">IC Number</label>
					<div class="col-sm-10">
						<input name="icnum" id="icnum" type="text" value="${m.icnum }"
							class="form-control" id="exampleInputName2"
							placeholder="IC Number">
					</div>
				</div>
				<div class="form-group">
					<label for="exampleInputFile" id="piclb"
						class="col-sm-2 control-label">IC-Card Image&nbsp;Upload </label>
					<div class="col-sm-10 pic">
						<input name="icfile" type="file" id="exampleInputFile"> <span
							class="help-block">Choose IC card image here.</span>
					</div>
				</div>
				<div class="form-group">
					<label for="exampleInputFile" id="portraitlb"
						class="col-sm-2 control-label">Portrait Upload </label>
					<div class="col-sm-10 pic">
						<input name="porfile" type="file" id="exampleInputFile">
						<span class="help-block">Choose Portrait here.</span>
					</div>
				</div>
			</form>

				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
						<button id="updateRegist"  class="btn btn-primary">Submit</button>
						<a href="login.jsp"  class="btn btn-primary">login</a>
					</div>
					
				</div>
					
				
		</div>



	</div>
  



</body>
<script type="text/javascript">
var ws=new WebSocket("ws://10.222.29.185:8999/A-version3/ws/push");
// ws.onmessage=function(event){
//   alert(event.data);
 // }

  $("#updateRegist").click(function(){
    
    var mname =  $("#mname").val();
    var mpwd = $("#mpwd").val();
    var comPwd = $("#comPwd").val();
    var icnum = $("#icnum").val();
    var maddr = $("#maddr").val();
    if(mpwd!=comPwd){
      $("#pwdMsg").text("两次密码不一致");
    }else if(mpwd = ""||mpwd==null){
      $("#pwdMsg").text("密码不能为空");
    
    }else if(mname = ""||mname==null){
      $("#nameMsg").text("姓名不能为空");
     }else{
      ws.send("200");
     $("#regform").submit(); 
     }
      
  });
</script>
</html>